import React, {Component} from 'react'
import {AgGridReact} from "ag-grid-react"
import 'ag-grid/dist/styles/ag-grid.css'
import 'ag-grid/dist/styles/ag-theme-balham.css'
import {HttpService} from "../components/http/HttpService"

class FlowList extends Component {
    constructor (props) {
        super(props)

        this.state = {
            columnDefs: [
                {headerName: "Make", field: "make"},
                {headerName: "Model", field: "model"},
                {headerName: "Price", field: "price"},

            ],
            rowData: [
                {make: "Toyota", model: "Celica", price: 35000},
                {make: "Ford", model: "Mondeo", price: 32000},
                {make: "Porsche", model: "Boxter", price: 72000},
            ],
        }
    }
    render ()  {
        let allprocess = HttpService.get("/flow/process/all")
        console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
        console.log(allprocess)


        return (
            <div
                className="ag-theme-balham"
                style={{
                    height: '100%',
                    width: '100%' }}
            >
                <AgGridReact
                    enableSorting={true}
                    enableFilter={true}
                    columnDefs={this.state.columnDefs}
                    rowData={this.state.rowData}>
                </AgGridReact>
            </div>
        )
    };

};

export default FlowList
